package mxmf.hibernate;

import chances.smart.commons.hibernate.type.JsonObjectType;
import chances.smart.commons.meta.MetaParamSet;

public class ParamsType extends JsonObjectType {

    @Override
    public Class<MetaParamSet> returnedClass() {
        return MetaParamSet.class;
    }

    @Override
    public boolean equals(Object x, Object y) {
        if (x == null || y == null)
            return false;
        return x.equals(y);
    }

    @Override
    public int hashCode(Object x) {
        return x.hashCode();
    }

    @Override
    public Object deepCopy(Object value) {
        if (value == null) {
            return null;
        }
        MetaParamSet c = (MetaParamSet) value;
        MetaParamSet setting = new MetaParamSet();
        setting.setValues(c.getValues());
        return setting;
    }
}
